;; ---------------- HTML,CSS,JS模式配置 ----------------

;;(add-hook 'js-mode-hook  'linum-mode)
;;(add-hook 'js-mode-hook #'lsp)

;;(add-hook 'css-mode-hook  'linum-mode)
;;(add-hook 'css-mode-hook #'lsp)

;;(add-hook 'html-mode-hook  'linum-mode)
;;(add-hook 'html-mode-hook #'lsp)


(require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.ts\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.css?\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.js\\'" . web-mode))

(defun my-web-mode-hook ()
  "Hooks for Web mode."
  (setq web-mode-markup-indent-offset 2)
  (setq web-mode-code-indent-offset 2)
  (setq web-mode-css-indent-offset 2)
)
(add-hook 'web-mode-hook  'my-web-mode-hook)    
(setq tab-width 2)

(add-hook 'web-mode-hook  'linum-mode)
(add-hook 'web-mode-hook #'lsp)

(setq web-mode-enable-current-column-highlight t)
(setq web-mode-enable-current-element-highlight t)

